feat/phase-5-platform: hotkey, tray, close-to-tray, file-picker (stacked on #7)#8
Merged
Merged
Conversation
WindowsHotkeyService registers the global hotkey via Win32 RegisterHotKey and subclasses the main window's WndProc with SetWindowSubclass to catch WM_HOTKEY. HotkeyModifiers map straight through to MOD_* constants (intentional alignment from Phase 1). Default Ctrl+Alt+S registered on startup; pressing it brings the window to the foreground from anywhere. HNotifyIconTrayService creates an H.NotifyIcon TaskbarIcon with: - left-click → ShowRequested → bring window forward - right-click context menu: "Show Snipdeck" and "Exit" Close-to-tray: App subscribes to AppWindow.Closing on the main window. When config says HideToTray, Closing is cancelled and the window hides. The tray's Exit flips an _allowClose flag so the next close passes through cleanly. The process keeps running while hidden so the hotkey stays live. IFilePickerService abstracts the FileOpenPicker setup (HWND init, filters, byte readback). CliEditorDialog no longer pokes Win32 directly. Identicon UserControl gains an IconRef dependency property; when set, it resolves the absolute path via IIconAssetStorage and renders the uploaded PNG instead of the identicon. CliCard binds both Seed (Cli.Id) and IconRef so uploaded icons replace the identicon in the home grid. This PR is the third in a stack of four. Base: feat/phase-4-authoring. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…alified App.Services TaskbarIcon.IconSource is Microsoft.UI.Xaml.Media.ImageSource — FontIconSource isn't assignable. Generate a stable identicon PNG at init time via IdenticonService.GeneratePng and load it as a BitmapImage. The init has to go async (image decode requires await), so ITrayService.Initialise becomes ITrayService.InitialiseAsync. Inside namespace Snipdeck.App.Controls, the unqualified 'App' identifier doesn't resolve to Snipdeck.App.App (sibling namespaces aren't searched). Fully qualify the call in Identicon.cs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…vent handlers - partial on HNotifyIconTrayService + its nested RelayCommand (CsWinRT1028). - RelayCommand uses primary constructor (IDE0290). - HNotifyIconTrayService menu construction switches to collection initialiser (IDE0017). - App.xaml.cs hoists the lambda subscriptions to named methods so IDE0200 stops flagging "(_, _) => Method()" patterns. - WindowsHotkeyService converts SetWindowSubclass / RemoveWindowSubclass / DefSubclassProc from DllImport to LibraryImport with the source-generated marshalling (SYSLIB1054). SubclassProc parameters are marked UnmanagedType.FunctionPtr. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
StuartMeeks
added a commit
that referenced
this pull request
May 29, 2026
feat/phase-6-settings: editable settings + Velopack updater (stacked on #8)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 5 of the build plan. The platform-services slice.
Base: `feat/phase-4-authoring` (PR #7). When the upstream stack merges, please retarget this PR to `master` and rebase.
What's live
New Core abstractions
App-side platform implementations
What CI doesn't verify (please test on Windows)
Not in this PR (deferred)
🤖 Generated with Claude Code